<%@page import="com.ereport.entity.NewsUpdate"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="<%=application.getContextPath() %>/css/css.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="<%=application.getContextPath()%>/css/datatable.css"/>
<script type="text/javascript" src="<%=application.getContextPath() %>/js/jquery-1.6.min.js"></script>	
<script language="javascript" src="<%=application.getContextPath() %>/js/calendar_eu.js"></script>
<script type="text/javascript" src="<%=application.getContextPath() %>/js/jquery-ui-1.8.17.custom.min.js"></script>	
<link rel="stylesheet" href="<%=application.getContextPath() %>/css/jquery-ui-1.8.17.custom.css"/>
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery.validate.js"></script>	
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery.validate.min.js"></script>
<script type="text/javascript" language="javascript" src="<%=application.getContextPath()%>/js/jquery.dataTables.nightly.js"></script>
<script type="text/javascript" src="<%=application.getContextPath()%>/js/colResizable-1.3.min.js"></script>
<script language="javascript" type="text/javascript">

$(document).ready(function(){
    $('#headLineList').dataTable();
    $("#headLineList").colResizable();
});

</script>

</head>
<body>
<table width="927" style="height:880px" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td height="116" align="left" valign="top" background="<%=application.getContextPath() %>/images/top-bg.jpg" style="background-repeat:repeat-x; background-position:left top">
    <%@ include file="../common/exe-header.jsp" %>
    <style>
 #field, label { float: left; font-family: Arial, Helvetica, sans-serif; font-size: 12px; }
 .dataTables_filter{
 width:195px
 }
 .dataTables_info{ font-size: 12px;width: 18%}
 tr.odd td.sorting_1{
 background-color:#CCCCCC;
 }
 tr.even td.sorting_1{
 background-color:#CCCCCC;
 }
 </style>
    </td>
  </tr>
  <tr>
    <td  align="center" valign="top"><table width="927" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="20">&nbsp;</td>
        <td width="643" align="right"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td align="left" valign="top">&nbsp;<a href="<%=application.getContextPath() %>/user/open.do"><img src="<%=application.getContextPath() %>/images/home1.jpg" width="20" height="20" border="0" /></a></td>
              <td width="8%" align="center"><a href="<%=application.getContextPath() %>/user/logout.do" style="font-family: sans-serif;">&nbsp;&nbsp;Logout</a></td>
            </tr>
          </table>
        </td>
        <td width="20">&nbsp;</td>
      </tr>
      <tr>
        <td width="20">&nbsp;</td>
        <td align="center" valign="top" class="heading">News</td>
        <td width="20">&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td height="10" align="left" valign="top">
                	<%@ include file="../common/newsMenu.jsp" %>
                </td>
        <td>&nbsp;</td>
      </tr>
      <%
      if(request.getParameter("msg")!=null){
      	out.println(request.getParameter("msg"));
      }
      %>
      
      <tr>
        <td>&nbsp;</td>
        <td align="center" valign="top" >
        <%
        List<NewsUpdate> nulist=(List<NewsUpdate>)request.getAttribute("nulist");
        if(nulist.size()>0){
        	%>
        	<form action="<%=application.getContextPath() %>/newsUpdate/delete.do" method="post" name="newsForm" id="newsForm">
        	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="box-border1">
        	<tr>
        		<td>&nbsp;<input type="hidden" name="newsListSize" value="<%= nulist.size()%>"/></td>
        	</tr>
        	<tr>
              <td width="366">
        	<div id="pub" >
          	<table width="100%" border="0" align="center"  cellpadding="5" cellspacing="1" bgcolor="#787878" style="border-top-left-radius: 5px;border-top-right-radius: 5px" id="headLineList" >
        	<thead>
                	<tr style="background:url('<%=application.getContextPath() %>/images/hed-bg-block-2.jpg'); background-repeat:repeat-x; background-position:left top">
                		<th width="2%" class="hed" style="font-weight: bold;"></th>
                		<th width="2%" class="hed" style="font-weight: bold;">S.No</th>
                		<th width="98%" class="hed" style="font-weight: bold;">Head Lines</th>
                	</tr>
        	</thead>
        	<tbody>
        	<%
        	for(int i=0;i<nulist.size();i++){
        	%>
        		<tr>
        		<td bgcolor="#cccccc" class="tableCell"> <input type="checkbox" name="newsCheckBox<%=i+1 %>" id="newsCheckBox" value="<%=nulist.get(i).getId() %>"/></td>
        		<td bgcolor="#cccccc" class="tableCell"> <%=i+1 %></td> 
        		<td bgcolor="#cccccc" class="tableCell">
        		<a href="<%=application.getContextPath() %>/newsUpdate/publishNews.do?newsid=<%=nulist.get(i).getId() %>" style="color: #1d7d92"><%=nulist.get(i).getHeadLine() %></a>
        		</td>
        	</tr>
        
        <%	}%>
			</tbody>        
        	</table>
        </div>
        </td>
        </tr>
        <tr>
        	<td>&nbsp;</td>
        </tr>
        <tr>
        <td><a href="<%=application.getContextPath()%>/newsUpdate/open.do"><input type="button" class="button-black-right" value="New News"/></a>
              <input type="submit" class="button-black-right" value="Delete" /></td>
        </tr>
        <tr>
        	<td>&nbsp;</td>
        </tr>
        </table>
        </form>
        <%
        }
        %>
        </td>
        <td>&nbsp;</td>
      </tr>
	  <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
     </table></td>
  </tr>
  <tr>
    <td height="40" align="left" valign="top" bgcolor="#0B0B0B">&nbsp;</td>
  </tr>
</table>
</body>
</html>